package com.cml.dm.admin.service.handler;

import cn.hutool.extra.spring.SpringUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.cml.dm.admin.entity.DmExeLogger;
import com.cml.dm.admin.entity.DmMetadata;
import com.cml.dm.admin.model.FileStoreModel;
import com.cml.dm.admin.service.QueryFactory;
import com.cml.dm.admin.service.SqlGenerateServiceFactory;
import com.cml.dm.admin.service.StoreFactory;
import com.cml.dm.admin.service.impl.BackupAdapter;
import com.cml.dm.admin.service.impl.BackupTaskExecutorService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class BackupTaskHandler extends  TaskHandler{

    private static final Logger logger = LoggerFactory.getLogger(BackupTaskHandler.class);

    private BackupAdapter backupAdapter;

    public BackupTaskHandler(){
        backupAdapter = SpringUtil.getBean(BackupAdapter.class);
    }

    @Override
    public void execute(DmMetadata dmMetadata, DmExeLogger dmExeLogger, Object extParameter) {
        backupAdapter.exec(dmMetadata,dmExeLogger,extParameter);
    }
}
